Newer
Older
taehui / qwilight-fe / src / app / [language] / layout.tsx
@Taehui Taehui on 17 Mar 946 bytes 2024-03-17 오후 3:50
import QwilightView from "@/components/QwilightView";
import { Stores } from "@/state/Stores";
import { NextIntlClientProvider } from "next-intl";
import { getMessages } from "next-intl/server";
import { ReactNode } from "react";

import "bootstrap/dist/css/bootstrap.min.css";
import "react-contexify/dist/ReactContexify.css";
import "react-toastify/dist/ReactToastify.css";

import "@/app/globals.scss";

export default async function Layout({
  children,
  params: { language },
}: {
  children: ReactNode;
  params: { language: string };
}) {
  return (
    <html lang={language}>
      <head>
        <title>Qwilight</title>
      </head>
      <body>
        <NextIntlClientProvider
          locale={language}
          messages={await getMessages({ locale: language })}
        >
          <Stores>
            <QwilightView>{children}</QwilightView>
          </Stores>
        </NextIntlClientProvider>
      </body>
    </html>
  );
}